package com.heraleign.cxf;

import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;
import javax.xml.ws.Endpoint;

@Configuration
public class CxfConfig {

    @Resource
    private Bus bus;

    @Resource
    private InterBsnOffer interBsnOffer;

    @Bean
    public Endpoint endpoint(){
        EndpointImpl endpoint = new EndpointImpl(bus, interBsnOffer);
        endpoint.publish("/GetBsnOffer");
        return endpoint;
    }
}
